package com.hnucm.cooklife.bean.db;

import com.chad.library.adapter.base.entity.JSectionEntity;
import com.chad.library.adapter.base.entity.SectionEntity;

public class ClasSec extends JSectionEntity{

    public int claid;
    public String clacato;
    public String clapic;
    public String claname;
    public int clasgroupId;

    private boolean isHeader;
    private Object mObject;

    public ClasSec(boolean isHeader, Object object) {
        this.isHeader = isHeader;
        this.mObject = object;
    }

    public Object getObject() {
        return mObject;
    }

    //重写此方法，返回boolean值，告知是否是header
    @Override
    public boolean isHeader() {
        return isHeader;
    }

    @Override
    public int getItemType() {
        if(isHeader()){
            return ClasSec.Companion.HEADER_TYPE;
        } else {
            return ClasSec.Companion.NORMAL_TYPE;
        }
    }
}
